# Sharepoint Monitor Folder Job
Synchronizes a SharePoint document library with the local monitor folder, so a file dropped into SharePoint is picked up and processed by this service's file handlers as if it had been dropped locally.
Configuration class: SyncSharepointMonitorCfg (SharepointCfg.SyncSharepointMonitor)
Schedule: Every Interval minutes.
# Purpose
Lets a remote or non-technical user (or another system) drop provisioning files (e.g. a matterlist.xlsx) into a SharePoint document library instead of needing direct access to the service's local watch folder — useful when the service and the people producing input files are not on the same network.
# Configuration
# FolderUrls
- Type:
string (list) - Default: —
- Description: One or more SharePoint document library URLs to monitor. The job does not run at all if this is empty. Example:
["/sites/Ops/MonitorDrop"].
# Interval
- Type:
int?(Configurator: "Interval (minutes)") - Default: —
- Description: How often, in minutes, to run the sync. The job does not run at all if this is empty or less than
1. Example:5.
# How It Works
Each run, for every URL in FolderUrls:
- Download: Any files found directly in the SharePoint document library are downloaded into the local monitor directory (prefixed
SPMonitor_<index>_to identify which remote library they came from and avoid name collisions with other monitored libraries), then deleted from SharePoint. From this point on, the file is processed exactly like any other file dropped locally — see File handlers overview. - Upload results back: Once local processing finishes, files that landed in the local monitor directory's
CompletedorErrorsubfolders (matching the current library'sSPMonitor_<index>_prefix) are uploaded back into a same-namedCompleted/Errorsubfolder within the source SharePoint document library — with the prefix stripped from the filename — and then removed locally.
This gives the person who dropped the file into SharePoint visibility into whether it completed successfully or failed, without needing access to the service's local filesystem.
# Related
- File handlers overview — how dropped files are processed once local
- Jobs — other background jobs